﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ArkadiaOsKernel.Core.Script
{
    class Memoire
    {
        #region registre
        public Registre RegA = new Registre();
        public Registre RegB = new Registre();
        public Registre RegC = new Registre();
        public Registre RegD = new Registre();
        public Registre RegE = new Registre();
        public Registre RegF = new Registre();
        public Registre RegG = new Registre();
        public Registre RegH = new Registre();
        public Registre RegI = new Registre();
        public Registre RegJ = new Registre();
        public Registre RegK = new Registre();
        public Registre RegL = new Registre();
        public Registre RegM = new Registre();
        public Registre RegN = new Registre();
        public Registre RegO = new Registre();
        public Registre RegP = new Registre();
        public Registre RegQ = new Registre();
        public Registre RegR = new Registre();
        public Registre RegS = new Registre();
        public Registre RegT = new Registre();
        public Registre RegU = new Registre();
        public Registre RegV = new Registre();
        public Registre RegW = new Registre();
        public Registre RegX = new Registre();
        public Registre RegY = new Registre();
        public Registre RegZ = new Registre();
        #endregion
        public string GetDataDuRegistre(string reg)
        {
            #region dataRegistre
            if (reg == "a")
            {
                return this.RegA.data;
            }
            else if (reg == "b")
            {
                return this.RegB.data;
            }
            else if (reg == "c")
            {
                return this.RegC.data;
            }
            else if (reg == "d")
            {
                return this.RegD.data;
            }
            else if (reg == "e")
            {
                return this.RegE.data;
            }
            else if (reg == "f")
            {
                return this.RegF.data;
            }
            else if (reg == "g")
            {
                return this.RegG.data;
            }
            else if (reg == "h")
            {
                return this.RegH.data;
            }
            else if (reg == "i")
            {
                return this.RegI.data;
            }
            else if (reg == "j")
            {
                return this.RegJ.data;
            }
            else if (reg == "k")
            {
                return this.RegK.data;
            }
            else if (reg == "l")
            {
                return this.RegL.data;
            }
            else if (reg == "m")
            {
                return this.RegM.data;
            }
            else if (reg == "n")
            {
                return this.RegN.data;
            }
            else if (reg == "o")
            {
                return this.RegO.data;
            }
            else if (reg == "p")
            {
                return this.RegP.data;
            }
            else if (reg == "q")
            {
                return this.RegQ.data;
            }
            else if (reg == "r")
            {
                return this.RegR.data;
            }
            else if (reg == "s")
            {
                return this.RegS.data;
            }
            else if (reg == "t")
            {
                return this.RegT.data;
            }
            else if (reg == "u")
            {
                return this.RegU.data;
            }
            else if (reg == "v")
            {
                return this.RegV.data;
            }
            else if (reg == "w")
            {
                return this.RegW.data;
            }
            else if (reg == "x")
            {
                return this.RegX.data;
            }
            else if (reg == "y")
            {
                return this.RegY.data;
            }
            else if (reg == "z")
            {
                return this.RegZ.data;
            }
            #endregion
            else
            {
                return "Erreur , Impossible de trouver le registre.";
            }
        }
        public void RangeDonnéeDuRegistre(string reg, string data)
        {
            #region dataRegistre
            if (reg == "a")
            {
                this.RegA.data = data;
            }
            else if (reg == "b")
            {
                this.RegB.data = data;
            }
            else if (reg == "c")
            {
                this.RegC.data = data;
            }
            else if (reg == "d")
            {
                this.RegD.data = data;
            }
            else if (reg == "e")
            {
                this.RegE.data = data;
            }
            else if (reg == "f")
            {
                this.RegF.data = data;
            }
            else if (reg == "g")
            {
                this.RegG.data = data;
            }
            else if (reg == "h")
            {
                this.RegH.data = data;
            }
            else if (reg == "i")
            {
                this.RegI.data = data;
            }
            else if (reg == "j")
            {
                this.RegJ.data = data;
            }
            else if (reg == "k")
            {
                this.RegK.data = data;
            }
            else if (reg == "l")
            {
                this.RegL.data = data;
            }
            else if (reg == "m")
            {
                this.RegM.data = data;
            }
            else if (reg == "n")
            {
                this.RegN.data = data;
            }
            else if (reg == "o")
            {
                this.RegO.data = data;
            }
            else if (reg == "p")
            {
                this.RegP.data = data;
            }
            else if (reg == "q")
            {
                this.RegQ.data = data;
            }
            else if (reg == "r")
            {
                this.RegR.data = data;
            }
            else if (reg == "s")
            {
                this.RegS.data = data;
            }
            else if (reg == "t")
            {
                this.RegT.data = data;
            }
            else if (reg == "u")
            {
                this.RegU.data = data;
            }
            else if (reg == "v")
            {
                this.RegV.data = data;
            }
            else if (reg == "w")
            {
                this.RegW.data = data;
            }
            else if (reg == "x")
            {
                this.RegX.data = data;
            }
            else if (reg == "y")
            {
                this.RegY.data = data;
            }
            else if (reg == "z")
            {
                this.RegZ.data = data;
            }
            #endregion
            else
            {
                new Exception("Erreur , Impossible de trouver le registre.");
            }
        }
    }
}
